package com.jsmy.softapp.presenter;

import com.jsmy.softapp.MyApp;
import com.jsmy.softapp.model.ZiLiaoModel;
import com.jsmy.softapp.util.ToastUtil;
import com.jsmy.softapp.view.ZiLiaoView;

/**
 * Created with Android Studio.
 * User: wei_cd.
 * Date: 2018/5/10.
 * Time: 15:35.
 * To change for file | settings | file and code templates.
 */

public class ZiLiaoPresenter extends BasePresenter<ZiLiaoView> {

    public ZiLiaoModel model = new ZiLiaoModel();

    @Override
    public void onComplete(String type, String code, String msg, Object object) {
        if (getView() != null) {
            switch (code) {
                case "N":
                    break;
                case "Y":
                    getView().showLoadingData(type, object);
                    break;
                default:
                    ToastUtil.showShort(MyApp.getMyApp(), msg);
                    break;
            }
            getView().hideLoading();
        }
    }
}
